↳ Prolog
↳ PrologToPiTRSProof
count_in_ga(atom(X), s(0)) → count_out_ga(atom(X), s(0))
count_in_ga(cons(atom(X), Y), s(Z)) → U3_ga(X, Y, Z, count_in_ga(Y, Z))
count_in_ga(cons(cons(U, V), W), Z) → U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_ga(U, V, W, Z, count_in_ga(X, Z))
U5_ga(U, V, W, Z, count_out_ga(X, Z)) → count_out_ga(cons(cons(U, V), W), Z)
U3_ga(X, Y, Z, count_out_ga(Y, Z)) → count_out_ga(cons(atom(X), Y), s(Z))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
count_in_ga(atom(X), s(0)) → count_out_ga(atom(X), s(0))
count_in_ga(cons(atom(X), Y), s(Z)) → U3_ga(X, Y, Z, count_in_ga(Y, Z))
count_in_ga(cons(cons(U, V), W), Z) → U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_ga(U, V, W, Z, count_in_ga(X, Z))
U5_ga(U, V, W, Z, count_out_ga(X, Z)) → count_out_ga(cons(cons(U, V), W), Z)
U3_ga(X, Y, Z, count_out_ga(Y, Z)) → count_out_ga(cons(atom(X), Y), s(Z))
COUNT_IN_GA(cons(atom(X), Y), s(Z)) → U3_GA(X, Y, Z, count_in_ga(Y, Z))
COUNT_IN_GA(cons(atom(X), Y), s(Z)) → COUNT_IN_GA(Y, Z)
COUNT_IN_GA(cons(cons(U, V), W), Z) → U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
COUNT_IN_GA(cons(cons(U, V), W), Z) → FLATTEN_IN_GA(cons(cons(U, V), W), X)
FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) → U1_GA(X, U, Y, flatten_in_ga(U, Y))
FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) → FLATTEN_IN_GA(U, Y)
FLATTEN_IN_GA(cons(cons(U, V), W), X) → U2_GA(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
FLATTEN_IN_GA(cons(cons(U, V), W), X) → FLATTEN_IN_GA(cons(U, cons(V, W)), X)
U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_GA(U, V, W, Z, count_in_ga(X, Z))
U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → COUNT_IN_GA(X, Z)
count_in_ga(atom(X), s(0)) → count_out_ga(atom(X), s(0))
count_in_ga(cons(atom(X), Y), s(Z)) → U3_ga(X, Y, Z, count_in_ga(Y, Z))
count_in_ga(cons(cons(U, V), W), Z) → U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_ga(U, V, W, Z, count_in_ga(X, Z))
U5_ga(U, V, W, Z, count_out_ga(X, Z)) → count_out_ga(cons(cons(U, V), W), Z)
U3_ga(X, Y, Z, count_out_ga(Y, Z)) → count_out_ga(cons(atom(X), Y), s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
COUNT_IN_GA(cons(atom(X), Y), s(Z)) → U3_GA(X, Y, Z, count_in_ga(Y, Z))
COUNT_IN_GA(cons(atom(X), Y), s(Z)) → COUNT_IN_GA(Y, Z)
COUNT_IN_GA(cons(cons(U, V), W), Z) → U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
COUNT_IN_GA(cons(cons(U, V), W), Z) → FLATTEN_IN_GA(cons(cons(U, V), W), X)
FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) → U1_GA(X, U, Y, flatten_in_ga(U, Y))
FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) → FLATTEN_IN_GA(U, Y)
FLATTEN_IN_GA(cons(cons(U, V), W), X) → U2_GA(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
FLATTEN_IN_GA(cons(cons(U, V), W), X) → FLATTEN_IN_GA(cons(U, cons(V, W)), X)
U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_GA(U, V, W, Z, count_in_ga(X, Z))
U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → COUNT_IN_GA(X, Z)
count_in_ga(atom(X), s(0)) → count_out_ga(atom(X), s(0))
count_in_ga(cons(atom(X), Y), s(Z)) → U3_ga(X, Y, Z, count_in_ga(Y, Z))
count_in_ga(cons(cons(U, V), W), Z) → U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_ga(U, V, W, Z, count_in_ga(X, Z))
U5_ga(U, V, W, Z, count_out_ga(X, Z)) → count_out_ga(cons(cons(U, V), W), Z)
U3_ga(X, Y, Z, count_out_ga(Y, Z)) → count_out_ga(cons(atom(X), Y), s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) → FLATTEN_IN_GA(U, Y)
FLATTEN_IN_GA(cons(cons(U, V), W), X) → FLATTEN_IN_GA(cons(U, cons(V, W)), X)
count_in_ga(atom(X), s(0)) → count_out_ga(atom(X), s(0))
count_in_ga(cons(atom(X), Y), s(Z)) → U3_ga(X, Y, Z, count_in_ga(Y, Z))
count_in_ga(cons(cons(U, V), W), Z) → U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_ga(U, V, W, Z, count_in_ga(X, Z))
U5_ga(U, V, W, Z, count_out_ga(X, Z)) → count_out_ga(cons(cons(U, V), W), Z)
U3_ga(X, Y, Z, count_out_ga(Y, Z)) → count_out_ga(cons(atom(X), Y), s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
FLATTEN_IN_GA(cons(atom(X), U), .(X, Y)) → FLATTEN_IN_GA(U, Y)
FLATTEN_IN_GA(cons(cons(U, V), W), X) → FLATTEN_IN_GA(cons(U, cons(V, W)), X)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ PiDP
FLATTEN_IN_GA(cons(atom(X), U)) → FLATTEN_IN_GA(U)
FLATTEN_IN_GA(cons(cons(U, V), W)) → FLATTEN_IN_GA(cons(U, cons(V, W)))
No rules are removed from R.
FLATTEN_IN_GA(cons(atom(X), U)) → FLATTEN_IN_GA(U)
FLATTEN_IN_GA(cons(cons(U, V), W)) → FLATTEN_IN_GA(cons(U, cons(V, W)))
POL(FLATTEN_IN_GA(x1)) = 2·x1
POL(atom(x1)) = x1
POL(cons(x1, x2)) = 1 + 2·x1 + x2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ PisEmptyProof
↳ PiDP
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
COUNT_IN_GA(cons(atom(X), Y), s(Z)) → COUNT_IN_GA(Y, Z)
COUNT_IN_GA(cons(cons(U, V), W), Z) → U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → COUNT_IN_GA(X, Z)
count_in_ga(atom(X), s(0)) → count_out_ga(atom(X), s(0))
count_in_ga(cons(atom(X), Y), s(Z)) → U3_ga(X, Y, Z, count_in_ga(Y, Z))
count_in_ga(cons(cons(U, V), W), Z) → U4_ga(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
U4_ga(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → U5_ga(U, V, W, Z, count_in_ga(X, Z))
U5_ga(U, V, W, Z, count_out_ga(X, Z)) → count_out_ga(cons(cons(U, V), W), Z)
U3_ga(X, Y, Z, count_out_ga(Y, Z)) → count_out_ga(cons(atom(X), Y), s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
COUNT_IN_GA(cons(atom(X), Y), s(Z)) → COUNT_IN_GA(Y, Z)
COUNT_IN_GA(cons(cons(U, V), W), Z) → U4_GA(U, V, W, Z, flatten_in_ga(cons(cons(U, V), W), X))
U4_GA(U, V, W, Z, flatten_out_ga(cons(cons(U, V), W), X)) → COUNT_IN_GA(X, Z)
flatten_in_ga(cons(cons(U, V), W), X) → U2_ga(U, V, W, X, flatten_in_ga(cons(U, cons(V, W)), X))
U2_ga(U, V, W, X, flatten_out_ga(cons(U, cons(V, W)), X)) → flatten_out_ga(cons(cons(U, V), W), X)
flatten_in_ga(cons(atom(X), U), .(X, Y)) → U1_ga(X, U, Y, flatten_in_ga(U, Y))
U1_ga(X, U, Y, flatten_out_ga(U, Y)) → flatten_out_ga(cons(atom(X), U), .(X, Y))
flatten_in_ga(atom(X), .(X, [])) → flatten_out_ga(atom(X), .(X, []))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
COUNT_IN_GA(cons(atom(X), Y)) → COUNT_IN_GA(Y)
U4_GA(flatten_out_ga(X)) → COUNT_IN_GA(X)
COUNT_IN_GA(cons(cons(U, V), W)) → U4_GA(flatten_in_ga(cons(cons(U, V), W)))
flatten_in_ga(cons(cons(U, V), W)) → U2_ga(flatten_in_ga(cons(U, cons(V, W))))
U2_ga(flatten_out_ga(X)) → flatten_out_ga(X)
flatten_in_ga(cons(atom(X), U)) → U1_ga(X, flatten_in_ga(U))
U1_ga(X, flatten_out_ga(Y)) → flatten_out_ga(.(X, Y))
flatten_in_ga(atom(X)) → flatten_out_ga(.(X, []))
flatten_in_ga(x0)
U2_ga(x0)
U1_ga(x0, x1)
The following rules are removed from R:
COUNT_IN_GA(cons(atom(X), Y)) → COUNT_IN_GA(Y)
Used ordering: POLO with Polynomial interpretation [25]:
flatten_in_ga(cons(atom(X), U)) → U1_ga(X, flatten_in_ga(U))
flatten_in_ga(atom(X)) → flatten_out_ga(.(X, []))
POL(.(x1, x2)) = x1 + x2
POL(COUNT_IN_GA(x1)) = 2 + 2·x1
POL(U1_ga(x1, x2)) = 2·x1 + x2
POL(U2_ga(x1)) = x1
POL(U4_GA(x1)) = 2 + x1
POL([]) = 0
POL(atom(x1)) = 1 + 2·x1
POL(cons(x1, x2)) = 2·x1 + x2
POL(flatten_in_ga(x1)) = x1
POL(flatten_out_ga(x1)) = 2·x1
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ UsableRulesProof
U4_GA(flatten_out_ga(X)) → COUNT_IN_GA(X)
COUNT_IN_GA(cons(cons(U, V), W)) → U4_GA(flatten_in_ga(cons(cons(U, V), W)))
flatten_in_ga(cons(cons(U, V), W)) → U2_ga(flatten_in_ga(cons(U, cons(V, W))))
U2_ga(flatten_out_ga(X)) → flatten_out_ga(X)
U1_ga(X, flatten_out_ga(Y)) → flatten_out_ga(.(X, Y))
flatten_in_ga(x0)
U2_ga(x0)
U1_ga(x0, x1)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
U4_GA(flatten_out_ga(X)) → COUNT_IN_GA(X)
COUNT_IN_GA(cons(cons(U, V), W)) → U4_GA(flatten_in_ga(cons(cons(U, V), W)))
flatten_in_ga(cons(cons(U, V), W)) → U2_ga(flatten_in_ga(cons(U, cons(V, W))))
U2_ga(flatten_out_ga(X)) → flatten_out_ga(X)
flatten_in_ga(x0)
U2_ga(x0)
U1_ga(x0, x1)
U1_ga(x0, x1)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ RuleRemovalProof
U4_GA(flatten_out_ga(X)) → COUNT_IN_GA(X)
COUNT_IN_GA(cons(cons(U, V), W)) → U4_GA(flatten_in_ga(cons(cons(U, V), W)))
flatten_in_ga(cons(cons(U, V), W)) → U2_ga(flatten_in_ga(cons(U, cons(V, W))))
U2_ga(flatten_out_ga(X)) → flatten_out_ga(X)
flatten_in_ga(x0)
U2_ga(x0)
U4_GA(flatten_out_ga(X)) → COUNT_IN_GA(X)
COUNT_IN_GA(cons(cons(U, V), W)) → U4_GA(flatten_in_ga(cons(cons(U, V), W)))
POL(COUNT_IN_GA(x1)) = 1 + 2·x1
POL(U2_ga(x1)) = x1
POL(U4_GA(x1)) = 2·x1
POL(cons(x1, x2)) = 2·x1 + x2
POL(flatten_in_ga(x1)) = x1
POL(flatten_out_ga(x1)) = 2 + 2·x1
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ RuleRemovalProof
↳ QDP
↳ PisEmptyProof
flatten_in_ga(cons(cons(U, V), W)) → U2_ga(flatten_in_ga(cons(U, cons(V, W))))
U2_ga(flatten_out_ga(X)) → flatten_out_ga(X)
flatten_in_ga(x0)
U2_ga(x0)